﻿@{
    Layout = "_CompanyLayout";
}
<script>
        $(document).ready(function () {
            $("#send").click(function () {
                var emailModel = new Object();
                emailModel.companyEmail = $("#companyEmail").val();
                emailModel.companyName = $("#companyName").val();
                emailModel.positionName = $("#positionName").val();
                emailModel.applicantEmail = $("#applicantEmail").val();
                emailModel.applicantName = $("#applicantName").val();
                emailModel.password = $("#password").val();
                emailModel.address = $("#address").val();
                emailModel.contacts = $("#contacts").val();
                emailModel.phoneNumber = $("#phoneNumber").val();
                emailModel.startTime = $("#startTime").val();
                emailModel.remarks = $("#remarks").val();
                $.ajax({
                type: "post",
                url: "/ApplyRecord/SendEmail",
                contentType: "application/json",
                data: JSON.stringify(emailModel),
                dataType: "json",
                    success: function (message) {
                        if (message.returnCode == "001") {
                            alert("发送成功");
                        }
                        else if (message.returnCode == "999") {
                            alert("发送失败！请检查企业邮箱密码是否正确");
                        }
                }
            });
            });
        });
</script>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">企业名称</label><input type="text" class="form-control" id="companyName" value="@ViewData["companyName"]" disabled="disabled" />
            </div>
        </div>
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">职位名称</label><input type="text" class="form-control" id="positionName" value="@ViewData["positionName"]" disabled="disabled" />
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">学生姓名</label><input type="text" class="form-control" id="applicantName" value="@ViewData["applicantName"]" disabled="disabled" />
            </div>
        </div>
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">学生邮箱</label><input type="text" class="form-control" id="applicantEmail" value="@ViewData["applicantEmail"]" disabled="disabled" />
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">企业邮箱</label><input type="text" class="form-control" id="companyEmail" value="@ViewData["companyEmail"]" disabled="disabled" />
            </div>
        </div>
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">企业邮箱密码</label><input type="password" class="form-control" id="password" value="" />
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">面试时间</label><input type="datetime-local" class="form-control" id="startTime" value="@DateTime.Now.ToString("yyyy-MM-ddThh:mm")" />
            </div>
        </div>
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">面试地点</label><input type="text" class="form-control" id="address" value="" />
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">联系人</label><input type="text" class="form-control" id="contacts" value="" />
            </div>
        </div>
        <div class="col-md-6 column">
            <div class="form-group">
                <label for="exampleInputEmail1">联系人号码</label><input type="text" class="form-control" id="phoneNumber" value="" />
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="form-group">
                <label for="exampleInputEmail1">备注</label><input type="text" class="form-control" id="remarks" value="" />
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-4 column">
        </div>
        <div class="col-md-4 column">
            <button type="button" class="btn btn-default btn-info" style="width:100%;" id="send">发送邮件</button>
        </div>
        <div class="col-md-4 column">
        </div>
    </div>
</div>
